package com.example.project.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.example.project.enums.ProjectStutusEnum;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.time.LocalDateTime;

import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;

import java.time.LocalDateTime;
import java.util.List;

@ApiModel("Project 表")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Project implements Serializable {
    private static final long serialVersionUID = -20191200960922264L;
    @ApiModelProperty("项目id")
    private Long id;

    @ApiModelProperty("项目名")
    private String projName;

    @ApiModelProperty("项目负责人")
    private Long projUserId;

    @TableField(exist = false)
    private Depart depart;

    @TableField(exist = false)
    private String projUserName;

    @ApiModelProperty("建设内容")
    private String projMat;

    @ApiModelProperty("计划总投资")
    private Double totalPlanPrice;

    @ApiModelProperty("实际总投资")
    private Double totalPrice;

    @ApiModelProperty("计划开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate planStartTime;

    @ApiModelProperty("计划结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate planEndTime;

    @ApiModelProperty("实际开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate finalStartTime;

    @ApiModelProperty("实际结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate finalEndTime;

    @ApiModelProperty("业主单位")
    private String ownerUnit;

    @ApiModelProperty("实施单位")
    private String doUnit;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("审核状态。1：审核中，2：审核通过，3：审核拒绝")
    private Integer applyStatus;

    private String applyReason;

    @ApiModelProperty("项目完成状态 0未完成 1已完成")
    private ProjectStutusEnum projStatus ;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Integer percentage;


    @TableField(exist = false)
    private List<User> userList;


}

